package com.znsd.stu.service.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.znsd.entitys.Users;
import com.znsd.stu.dao.Cwj_UserDao;
import com.znsd.stu.dao.UserDao;
import com.znsd.stu.service.Cwj_UserService;
import com.znsd.stu.service.UserService;
@Service
public class Cwj_UserServiceImpl implements Cwj_UserService {
	@Autowired
	private Cwj_UserDao Cwj_userDao;

	@Override
	public List<Users> gettecher() {
		// TODO Auto-generated method stub
		return Cwj_userDao.gettecher();
	}

	@Override
	public List<Users> getStuByClass(Integer classId) {
		// TODO Auto-generated method stub
		return Cwj_userDao.getStuByClass(classId);
	}

	@Override
	public void updateUserClass(Integer newId, Integer oldId) {
		// TODO Auto-generated method stub
		Cwj_userDao.updateUserClass(newId, oldId);
	}

	@Override
	public int getCountTeacher() {
		// TODO Auto-generated method stub
		return Cwj_userDao.getCountTeacher();
	}

	@Override
	public Users getByTeaher(Integer userId) {
		// TODO Auto-generated method stub
		return Cwj_userDao.getByTeaher(userId);
	}

	@Override
	public void updateteacher(Integer user_id, String user_name, Integer user_age, String user_phone, String user_mail,
			String user_idCard, Date user_birthday, String user_native, String user_home, String user_education,
			String user_nation, Date graduate_time, Integer user_married, Integer user_sex,Integer user_state) {
		Cwj_userDao.updateteacher(user_id, user_name, user_age, user_phone, user_mail, user_idCard, user_birthday, user_native, user_home, user_education, user_nation, graduate_time, user_married, user_sex,user_state);
	}

	@Override
	public void delete(Integer id) {
		Cwj_userDao.delete(id);
	}

	@Override
	public List<Users> getStudnet() {
		// TODO Auto-generated method stub
		return Cwj_userDao.getStudnet();
	}

	@Override
	public int getCountStudent() {
		// TODO Auto-generated method stub
		return Cwj_userDao.getCountStudent();
	}

	@Override
	public void updateStuByClassPost(Integer classId, Integer stuId) {
		// TODO Auto-generated method stub
		Cwj_userDao.updateStuByClassPost(classId, stuId);
	}

	@Override
	public List<Users> gettecherAll() {
		// TODO Auto-generated method stub
		return Cwj_userDao.gettecherAll();
	}

	
}
